module.exports = {
	gettime(date) {
		let hours = this.filzero(Math.floor(date / 3600)); //获取小时数
		let minutes = this.filzero(Math.floor((date % 3600) / 60)); //获取分钟数
		let seconds = this.filzero(Math.floor(date % 60)); //获取秒数
		return `${hours}:${minutes}:${seconds}`;
	},
	// 补零
	filzero(num) {
		return num < 10 ? `0${num}` : num;
	},
};
